﻿@model ITS.Core.ViewModel.Contents.CreateContentItemViewModel

@{
    ViewBag.Title = "Create new content - " + Model.ContentCategory.Name;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Model.ContentCategory.Name</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("CreateContentItem", "Content", null, FormMethod.Post, new { enctype = "multipart/form-data"}))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Create new content</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.SubCategoryID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.SubCategoryID, Model.SubCategories)
            @Html.ValidationMessageFor(model => model.SubCategoryID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LanguageID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.LanguageID, Model.SupportedLanguages)
            @Html.ValidationMessageFor(model => model.LanguageID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Content)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Content)
            @Html.ValidationMessageFor(model => model.Content)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
